package com.hospital.service.impl;

import com.hospital.dao.RegisterDao;
import com.hospital.domain.Register;
import com.hospital.service.RegisterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.Date;
import java.util.List;

@Service
public class RegisterServiceImpl implements RegisterService {
    @Autowired
    RegisterDao registerDao;

    @Override
    public int addRegister(Register register) {
        return registerDao.addRegister(register);
    }

    @Override
    public List<Register> selectRegisterByUserID(int userID) {
        return registerDao.selectRegisterByUserID(userID);
    }

    @Override
    public int deleteResById(int id) {
        return registerDao.deleteRegisterById(id);
    }

    @Override
    public List<Register> selectRegisterByDoctorID(int doctorID, Date date, String userName, String amorPM) {
        return registerDao.selectRegisterByDoctorID(doctorID,date,userName,amorPM);
    }

    @Override
    public int selectTimesOrder(Register register) {
        return registerDao.selectTimesOrder(register);
    }

    @Override
    public int addinfor(String remarks, int registID) {
        return registerDao.addinfor(remarks,registID);
    }


}
